<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>万信管理后台</title>
     <%@ include file="/commons/meta.jsp"%>
    <link href="${ctx}/resources/admin/css/base.css" rel="stylesheet">
</head>
<body>
<div id="loading" class="loading" >加载中…</div>
<div id="shade-div" class="shade-div hide"></div>
<%@ include file="/jsps/admin/inc/header.jsp"%>
<%@ include file="/jsps/admin/inc/menu.jsp"%>
<div id="main">
    <div id="content" class="orgStr">
    <div class="hd">
        <span>功能权限</span>
        <a href="javascript:;" class="btn blue-btn fr" id="addRights">添加权限</a>
    </div>
    <table class="table-list">
        <tr>
            <th>功能</th>
            <!-- <th>描述</th> -->
            <th>操作</th>
        </tr>
        <s:iterator value="pager.result" status="i" var="ss">
	        <tr>
	            <td><s:property value="name" /></td>
	             <!-- <td><s:property value="description" /></td>-->
	            <td><a href="javascript:;" class="edit" value="<s:property value="id" />">修改</a>&nbsp;&nbsp;&nbsp;&nbsp;
	           
	            <s:if test="id!=1&&id!=3">
	            <a href="${ctx}/privilege/user_privilege!rightShare.xhtml?syspower.id=<s:property value="id" />">权限分配</a>&nbsp;&nbsp;&nbsp;&nbsp;
	            <a href="javascript:;" class="delete" value="<s:property value="id" />">删除</a>
	            </s:if>
	            </td>
	        </tr>
	    </s:iterator>
    </table>
    <s:if test="pager.totalCount > 0">
		<jsp:include page="/jsps/admin/inc/pager.jsp">
			<jsp:param name="pageUrl" value="${ctx}/privilege/user_privilege!list.xhtml" />
		</jsp:include>
	</s:if>
</div>
</div>
<%@ include file="/jsps/admin/inc/footer.jsp"%>
<!--新增权限-->
<div class="popbox w500" id="newlyAdded" >
    <form id="saveForm">
	    <div class="popbox-hd">
	        <h2>添加权限</h2>
	        <a href="javascript:;" title="关闭" class="closePopBtn"></a>
	    </div>
	    <div class="popbox-bd">
	        <p><label>名称：</label> <input type="text" class="itext" id="save_name" name="syspower.name"></p>
	        <p><label>参数：</label> <input type="text" class="itext" id="save_parameter" name="syspower.parameter"></p>
	        <p><label>描述：</label><textarea id="save_description" name="syspower.description"></textarea></p>
	    </div>
	    <div class="popbox-ft">
	        <a href="javascript:;" class="btn blue-btn" id="saveButton">保存</a><a href="javascript:;" class="btn gray-btn cancelBtn">取消</a>
	    </div>
    </form>
</div>
<!--修改权限-->
<div class="popbox w500" id="editRights" >
	<form id="editForm">
		<input type="hidden" value="" id="edit_id" name="syspower.id">
	    <div class="popbox-hd">
	        <h2>修改权限</h2>
	        <a href="javascript:;" title="关闭" class="closePopBtn"></a>
	    </div>
	    <div class="popbox-bd">
	        <p><label>名称：</label> <input type="text" class="itext" value="" id="edit_name" name="syspower.name"></p>
	        <p><label>参数：</label> <input type="text" class="itext" value="" id="edit_parameter" name="syspower.parameter"></p>
	        <p><label>描述：</label><textarea id="edit_description" name="syspower.description"></textarea></p>
	    </div>
	    <div class="popbox-ft">
	        <a href="javascript:;" class="btn blue-btn" id="editButton">保存</a><a href="javascript:;" class="btn gray-btn cancelBtn">取消</a>
	    </div>
    </form>
</div>
<!--警告框-->
<div class="popbox w300" id="warning" >
	<input id="sureDelId" value="" type="hidden"/>
    <div class="popbox-hd">
        <h2>警告</h2>
        <a href="javascript:;" title="关闭" class="closePopBtn"></a>
    </div>
    <div class="popbox-bd">
        <p class="center"></p>
    </div>
    <div class="popbox-ft">
        <a href="javascript:;" class="btn blue-btn" id="sureDelButton">确定</a><a href="javascript:;" class="btn gray-btn cancelBtn">取消</a>
    </div>
</div>
<script src="${ctx}/resources/admin/js/lib/jquery-1.8.0.min.js"></script>
<script src="${ctx}/resources/admin/js/common.js"></script>
<script src="${ctx}/resources/admin/js/lib/jquery-ui.js"></script>
<script src="${ctx}/resources/admin/js/privilege/userPrivilege.js"></script>
<script type="text/javascript">
$(function(){
	common.menuClicked('P8', 'C9');
});
</script>
</body>
</html>